{if $cat->ao_cat_status=='0'} {assign $non = "CHECKED"}{else}{assign $non = ""}{/if}
{if $cat->ao_cat_status=='1'} {assign $oui = "CHECKED"}{else}{assign $oui = ""}{/if}
<div id="main_container">

	{$oZoneHeader}
    
    <div class="main_content">
        {$oZoneTopMenu}
        <div class="center_content">  
            <div class="left_content">
                {$oZoneLeftMenu}
            </div>
    
            <div class="right_content">
                {if $cat->ao_cat_id}
                    <h2>Actualité - Editer une catégorie</h2> 
                {else}
                    <h2>Actualité - Ajouter une catégorie</h2> 

                {/if}
                    
                <form action="{jurl 'actu~BoActuCategorie:sauvegarder'}" method="post" id="editActuCategorie" name="editActuCategorie">
                    <input type="hidden" name="id" value="{$cat->ao_cat_id}" />
                    <dl>
                		<dt><label>Titre *: </label></dt>
                 		<dd><input type="text" name="cat_name" value="{$cat->ao_cat_name}" validation="required" /></dd>
              		</dl>
                     <dl>
                		<dt><label>Statut : </label></dt>
                 		<dd>
                            <input type="radio" name="statut" value="1" {$oui}/> Activé
                            <input type="radio" name="statut" value="0" {$non}/> Désactivé
                        </dd>
              		</dl>

                    <dl class="submit">
                        <input class="valider" title="Valider" type="submit" value="" style="margin-right:10px;"/>
                 		<a title="Annuler" href="{jurl 'actu~BoActuCategorie:index'}" class="bt_green"><span class="bt_green_lft"></span><strong>Annuler</strong><span class="bt_green_r"></span></a>
                    </dl>
                  
                 </form>

            </div><!-- end of right content-->
        </div>   <!--end of center content -->               

        <div class="clear"></div>
    </div> <!--end of main content-->
	
    
    <div class="footer">
    </div>

</div>
{literal}
    <style type="text/css">
        p label {
            width:400px;margin-right:20px;
        }
        p span {float:right;margin-right:350px;}
    </style>
    <script type="text/javascript">
       

        // form validation
        var demoForm = $("#editActuCategorie");
        demoForm.validation();
        demoForm.submit(function(e) {

            $("#valid-form").remove();
            if(demoForm.validate()) {
                document.forms["editActuCategorie"].submit();
            }
            e.preventDefault();
        });
    </script>
{/literal}
